Message sending method and device, code stream processing method and device

ABSTRACT

A message sending method and device, and a code stream processing method and device are provided. In the message sending method, a first server acquires and caches a code stream which is the same as a code stream of a second server; the first server acquires an initial position for sending the code stream; and after the second server stops sending the code stream, the first server constructs a message corresponding to the code stream, and sends the message starting from the initial position according to a source Internet Protocol (IP) address of the second server.

TECHNICAL FIELD

The disclosure relates to the field of communications, for example, to amessage sending method and device, and a code stream processing methodand device.

BACKGROUND

Along with the development of sciences and technologies, variousterminals bring great convenience to the lives of people, for example,an Internet Protocol Television (IPTV). The IPTV is a new technologyintegrating technologies of Internet, multimedia, communications and thelike by virtue of a broadband network and providing multiple kinds ofinteractive service including a digital television for home users. Byvirtue of current technologies, a user may execute operations of videoon demand and the like besides watching conventional live channels, andsuch service may be provided by a server of an Internet Service Provider(ISP).

A sending server of a code stream of a channel may be found to have aproblem. For example, a memory bank may be required to be replaced, ahard disk where an operating system is located may need to be replacedand a software version may need to be upgraded and replaced. Under theseconditions, it may be needed to interrupt a service, delete the channeland then recreate the code stream of the channel on another server forservice provision. The completion of these operations may usually take aperiod of time, for example, 5-10 minutes. In this period, a user mayface a blank screen because there is no code stream in a multicastgroup. For avoiding excessively great impact on a user, a passage, whichis often read and displayed on a terminal, may usually be displayed onthe terminal in advance, for example, “We will temporarily stopproviding service for maintenance in a certain time period”. Under sucha condition, the service has to be interrupted.

From the above technical solution, it can be seen that a serviceinterruption method may have the following shortcomings:

1. Occurrence of blank screen may bring a very poor watching experienceto the user.

2. An operation time period may be limited. For controlling an influencerange of blank screen, the operation may be suggested to be executed ata moment when there are fewer watching users, for example, the operationmay be executed at 2-3 o'clock in the morning. Although recreationusually requires a short time, from the perspective of risk prevention,influence time may usually exceed 10 minutes. Moreover, manualintervention may be required to prevent an excessively long interruptiontime caused by a service abnormity.

3. Loss of the service may be caused. Although the operation is executedat the moment when there are fewer watching users, if the operation isexecuted in a commercial break, loss of revenues from advertising mayalso occur.

Thus it can be seen that migration of a multicast channel may cause aservice interruption.

For a problem of incapability in implementing migration of a multicastchannel without service interruption, there is yet no effective solutionat present.

SUMMARY

Some exemplary embodiments of the disclosure provide a message sendingmethod and device, and a code stream processing method and device, whichmay at least solve a problem of incapability in implementing migrationof a multicast channel without service interruption.

A message sending method is provided, which may include the followingacts.

A first server may acquire and cache a code stream which issubstantially the same as a code stream of a second server.

The first server may acquire an initial position for sending the codestream.

After the second server stops sending the code stream, the first servermay construct a message corresponding to the code stream, and may sendthe message starting from the initial position according to a sourceInternet Protocol (IP) address of the second server.

In an exemplary embodiment, the act that the first server sends themessage according to the source IP address of the second server mayinclude one of the following acts.

The first server may add a local route to send the message by virtue ofthe source IP address of the second server.

The first server may fill the source IP address of the second serverinto an IP address field of the message, and may send the message.

In an exemplary embodiment, before the act that the first serveracquires and caches the code stream which is substantially the same asthe code stream of the second server, the method may further include thefollowing act.

The first server may receive a notification message sent by a ServiceControl Unit (SCU). In the exemplary embodiment, the notificationmessage may be used for notifying the first server to acquire codestream information. The code stream information may be used by the firstserver for acquiring and caching the code stream. The code streaminformation may include at least one of the following information: asource of the code stream, a protocol type of the code stream, astarting position of caching the code stream and information of thesecond server.

In an exemplary embodiment, after the act that the first server acquiresand caches the code stream which is substantially the same as the codestream of the second server, the method may further include thefollowing act.

The first server may notify the SCU of an acquisition result ofacquiring the code stream. In the exemplary embodiment, the acquisitionresult may be used by the SCU for judging whether to reselect a serverfor replacing the second server or not, and after determining that it isnot needed to reselect the server, the SCU may send information of thefirst server to the second server.

In an exemplary embodiment, after the act that the first serverconstructs the message corresponding to the code stream and sends themessage starting from the initial position according to the source IPaddress of the second server, the method may further include thefollowing act.

The first server may report a sending result of sending the message tothe SCU.

In an exemplary embodiment, the act that the first server acquires thecode stream which is substantially the same as the code stream of thesecond server may include at least one of the following acts.

The first server may acquire the code stream from another server exceptthe second server.

The first server may acquire the code stream from storage equipmentconfigured to store the code stream.

In an exemplary embodiment, the act that the first server acquires theinitial position for sending the code stream may include at least one ofthe following acts.

The first server may acquire the initial position in a manner ofnegotiating with the second server.

The first server may acquire the initial position which is preset.

A code stream processing method is provided, which may include thefollowing acts.

A second server may receive a message sent by an SCU, and the messagemay be used for notifying the second server that a first server is toreplace the second server to send a code stream.

The second server may acquire an initial position for sending the codestream by the first server.

The second server may stop sending the code stream at the initialposition.

In an exemplary embodiment, the act that the second server acquires theinitial position for sending the code stream by the first server mayinclude the following act.

The second server may acquire the initial position in a manner ofnegotiating with the first server.

In an exemplary embodiment, the act that the second server receives themessage sent by the SCU may include the following act.

The second server may receive, in a manner of interacting with the SCUabout real-time information of the code stream, the message sent by theSCU. In the exemplary embodiment, the real-time information of the codestream may be used by the SCU for sending a notification message to thefirst server. The notification message may be used for notifying thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server, acquire the initialposition for sending the code stream, and after the second server stopssending the code stream, construct a message corresponding to the codestream and send the message starting from the initial position accordingto a source IP address of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information. The codestream information may include at least one of the followinginformation: a source of the code stream, a protocol type of the codestream, a starting position of caching the code stream and informationof the second server.

A code stream processing method is provided, which may include thefollowing acts.

An SCU may notify a first server to acquire and cache a code streamwhich is substantially the same as a code stream of a second server.

After receiving, from the first server, information indicating normalacquisition of the code stream, the SCU may send information of thefirst server to the second server. In the exemplary embodiment, theinformation of the first server may be used for determining an initialposition for sending the code stream by the first server.

In an exemplary embodiment, the initial position may be determinedthrough negotiation performed by the second server with the first serveraccording to the information of the first server.

In an exemplary embodiment, the act that the SCU notifies the firstserver to acquire and cache the code stream which is substantially thesame as the code stream of the second server may include the followingacts.

The SCU may interact with the second server about real-time informationof the code stream.

The SCU may send a notification message to the first server according tothe real-time information of the code stream. In the exemplaryembodiment, the notification message may be used for notifying the firstserver to acquire and cache the code stream which is substantially thesame as the code stream of the second server. In the exemplaryembodiment, the notification message may further be used for notifyingthe first server to acquire the initial position for sending the codestream, and after the second server stops sending the code stream,construct a message corresponding to the code stream and send themessage starting from the initial position according to a source IPaddress of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information.

In the exemplary embodiment, the code stream information may include atleast one of the following information: a source of the code stream, aprotocol type of the code stream, a starting position of caching thecode stream and information of the second server.

In an exemplary embodiment, the method may further include the followingact.

After receiving, from the first server, information indicatingacquisition abnormity of the code stream, the SCU may select a thirdserver to replace the second server.

In an exemplary embodiment, after the act that the SCU sends theinformation of the first server to the second server, the method mayfurther include the following act.

A sending result reported by the first server may be received. In thisexemplary embodiment, the sending result may be a sending result ofsending the message by the first server.

A message sending device is provided, which may be applied to a firstserver and include: a first acquisition module, a second acquisitionmodule and a first sending module.

The first acquisition module may be configured to acquire and cache acode stream which is substantially the same as a code stream of a secondserver.

The second acquisition module may be configured to acquire an initialposition for sending the code stream.

The first sending module may be configured to, after the second serverstops sending the code stream, construct a message corresponding to thecode stream, and send the message starting from the initial positionaccording to a source IP address of the second server.

In an exemplary embodiment, the first sending module may be configuredto:

add a local route to send the message by virtue of the source IP addressof the second server; or,

fill the source IP address of the second server into an IP address fieldof the message, and send the message.

In an exemplary embodiment, the device may further include a firstreceiving module.

The first receiving module may be configured to receive a notificationmessage sent by an SCU. In the exemplary embodiment, the notificationmessage may be used for notifying the first server to acquire codestream information. The code stream information may be used by the firstserver for acquiring and caching the code stream. The code streaminformation may include at least one of the following information: asource of the code stream, a protocol type of the code stream, astarting position of caching the code stream and information of thesecond server.

In an exemplary embodiment, the device may further include a firstnotification module.

The first notification module may be configured to notify the SCU of anacquisition result of acquiring the code stream. The acquisition resultmay be used by the SCU for judging whether to reselect a server forreplacing the second server or not, and after determining that it is notneeded to reselect the server, the SCU may send information of the firstserver to the second server.

In an exemplary embodiment, the device may further include a reportingmodule.

The reporting module may be configured to report a sending result ofsending the message to the SCU.

In an exemplary embodiment, the first acquisition module may beconfigured to acquire the code stream in at least one of the followingmanners:

acquiring the code stream from another server except the second server.

acquiring the code stream from storage equipment configured to store thecode stream.

In an exemplary embodiment, the second acquisition module may beconfigured to acquire the initial position in at least one of thefollowing manners:

acquiring the initial position in a manner of negotiating with thesecond server.

acquiring the initial position which is preset.

A code stream processing device is provided, which may be applied to asecond server and include: a second receiving module, a thirdacquisition module and a stopping module.

The second receiving module may be configured to receive a message sentby an SCU, and the message may be used for notifying the second serverthat a first server is to replace the second server to send a codestream.

The third acquisition module may be configured to acquire an initialposition for sending the code stream by the first server.

The stopping module may be configured to stop sending the code stream atthe initial position.

In an exemplary embodiment, the third acquisition module may beconfigured to:

acquire the initial position in a manner of negotiating with the firstserver.

In an exemplary embodiment, the second receiving module may beconfigured to:

receive, in a manner of interacting with the SCU about real-timeinformation of the code stream, the message sent by the SCU. Thereal-time information of the code stream may be used by the SCU forsending a notification message to the first server. The notificationmessage may be used for notifying the first server to acquire and cachethe code stream which is substantially the same as the code stream ofthe second server, acquire the initial position for sending the codestream, and after the second server stops sending the code stream,construct a message corresponding to the code stream and send themessage starting from the initial position according to a source IPaddress of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information. The codestream information may include at least one of the followinginformation: a source of the code stream, a protocol type of the codestream, a starting position of caching the code stream and informationof the second server.

A code stream processing device is provided, which may be applied to anSCU and include: a second notification module and a second sendingmodule.

The second notification module may be configured to notify a firstserver to acquire and cache a code stream which is substantially thesame as a code stream of a second server.

The second sending module may be configured to, after informationindicating normal acquisition of the code stream may be received fromthe first server, send the information of the first server to the secondserver. The information of the first server may be used for determiningan initial position for sending the code stream by the first server.

In an exemplary embodiment, the initial position may be determinedthrough negotiation performed by the second server with the first serveraccording to the information of the first server.

In an exemplary embodiment, the second notification module may include:an interaction unit and a sending unit.

The interaction unit may be configured to interact with the secondserver about real-time information of the code stream.

The sending unit may be configured to send a notification message to thefirst server according to the real-time information of the code stream.The notification message may be used for notifying the first server toacquire and cache the code stream which is substantially the same as thecode stream of the second server. The notification message may furtherbe used for notifying the first server to acquire the initial positionfor sending the code stream, and after the second server stops sendingthe code stream, construct a message corresponding to the code streamand send the message starting from the initial position according to asource IP address of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information. The codestream information may include at least one of the followinginformation: a source of the code stream, a protocol type of the codestream, a starting position of caching the code stream and informationof the second server.

In an exemplary embodiment, the device may further include a selectionmodule.

The selection module may be configured to, after information indicatingacquisition abnormity of the code stream may be received from the firstserver, select a third server to replace the second server.

In an exemplary embodiment, the device may further include a thirdreceiving module.

The third receiving module may be configured to receive a sending resultreported by the first server. The sending result may be a sending resultof sending the message by the first server.

A computer-readable storage medium is provided, which may storecomputer-executable instructions, the computer-executable instructionsbeing configured to execute the abovementioned methods.

By virtue of the solutions in some exemplary embodiments of thedisclosure, a problem of incapability in implementing migration of amulticast channel without service interruption may be solved, and aneffect of migrating the multicast channel without service interruptionmay be achieved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart of a message sending method according to anexemplary embodiment of the disclosure;

FIG. 2 is a flowchart of a first code stream processing method accordingto an exemplary embodiment of the disclosure;

FIG. 3 is a flowchart of a second code stream processing methodaccording to an exemplary embodiment of the disclosure;

FIG. 4 is a structure block diagram of a message sending deviceaccording to an exemplary embodiment of the disclosure;

FIG. 5 is a first exemplary structure block diagram of a message sendingdevice according to an exemplary embodiment of the disclosure;

FIG. 6 is a second exemplary structure block diagram of a messagesending device according to an exemplary embodiment of the disclosure;

FIG. 7 is a third exemplary structure block diagram of a message sendingdevice according to an exemplary embodiment of the disclosure;

FIG. 8 is a structure block diagram of a first code stream processingdevice according to an exemplary embodiment of the disclosure;

FIG. 9 is a structure block diagram of a second code stream processingdevice according to an exemplary embodiment of the disclosure;

FIG. 10 is a structure block diagram of a second notification module 92in a second code stream processing device according to an exemplaryembodiment of the disclosure;

FIG. 11 is a first exemplary structure block diagram of a second codestream processing device according to an exemplary embodiment of thedisclosure;

FIG. 12 is a second exemplary structure block diagram of a second codestream processing device according to an exemplary embodiment of thedisclosure;

FIG. 13 is a schematic diagram of code stream introduction of amulticast outgoing channel; and

FIG. 14 is a schematic diagram of migration of a multicast outgoingchannel according to an exemplary embodiment of the disclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS

It is important to note that terms “first”, “second” and the like in thespecification, claims and drawings of the disclosure are adopted not todescribe a specific sequence or order but to distinguish similarobjects.

An exemplary embodiment provides a message sending method. FIG. 1 is aflowchart of a message sending method according to an exemplaryembodiment of the disclosure. As shown in FIG. 1, the flow may includethe following acts:

At act S102, a first server may acquire and cache a code stream which issubstantially the same as a code stream of a second server.

At act S104, the first server may acquire an initial position forsending the code stream. In some exemplary embodiments, the position maybe a timestamp on a time axis, and may alternatively be a messagenumber.

At act S106, after the second server stops sending the code stream, thefirst server may construct a message corresponding to the code stream,and may send the message starting from the initial position according toa source IP address of the second server.

By the acts, when the second server is required to be replaced, thefirst server may send the message corresponding to the code streamaccording to the source IP address of the second server, therebyimplementing seamless migration of a multicast channel. A problem ofincapability in implementing migration of the multicast channel withoutservice interruption may be solved and an effect of migrating themulticast channel without service interruption may be achieved.

A key for implementing seamless migration of the multicast channel maybe a source IP. Keeping the source IP unchanged may ensure stability ofthe code stream. In an exemplary embodiment, the act that the firstserver sends the message according to the source IP address of thesecond server may be implemented in one of the following manners. Thefirst server may add a local route to send the message by virtue of thesource IP address of the second server, for example, the route may beadded by virtue of a command ip route add local IP_A dev lo tab local.Alternatively, the first server may fill the source IP address of thesecond server into an IP address field of the message, and may send themessage. Of course, besides the two manners, processing of sending themessage according to the source IP address of the second server mayalternatively be implemented by virtue of any other manner as long as asource IP address for sending the message is the source IP address ofthe second server.

When acquiring and caching the code stream, the first server may executea related operation according to a notification message sent by an SCU.In an exemplary embodiment, before the act that the first serveracquires and caches the code stream which is substantially the same asthe code stream of the second server, the method may further include thefollowing act. The first server may receive the notification messagesent by the SCU. In the exemplary embodiment, the notification messagemay be used for notifying the first server to acquire code streaminformation. The code stream information may be used by the first serverfor acquiring and caching the code stream. The code stream informationmay include at least one of the following information: a source of thecode stream, a protocol type of the code stream, a starting position ofcaching the code stream and information of the second server.

From the above exemplary embodiment, it can be seen that, after thesecond server stops sending the code stream, the first server mayreplace the second server to continue sending the code stream. A premisefor enabling the first server to replace the second server may be thatthe first server can acquire the code stream which is substantially thesame as the code stream of the second server. If the first server cannotacquire the code stream, another server may replace the second server.In an exemplary embodiment, after the act that the first server acquiresand caches the code stream which is substantially the same as the codestream of the second server, the method may further include thefollowing act. The first server may notify the SCU of an acquisitionresult of acquiring the code stream. The acquisition result may be usedby the SCU for judging whether to reselect a server for replacing thesecond server or not. After determining that it is not needed toreselect the server, the SCU may send information of the first server tothe second server.

In an exemplary embodiment, after the act that the first serverconstructs the message corresponding to the code stream and sends themessage starting from the initial position according to the source IPaddress of the second server, the method may further include thefollowing act: The first server may report a sending result of sendingthe message to the SCU. Until the completion of this act, a migrationprocess of the channel is finished, and the subsequent code stream mayall be provided by the first server. After the second server returns tonormal, the second server may continue sending the code stream, that is,the second server which returns to normal may replace the first server,and a replacement operation may similarly adopt the abovementionedprocess.

When the first server acquires the code stream which is substantiallythe same as the code stream of the second server, multiple acquisitionmanners may be adopted. In an exemplary embodiment, the followingacquisition manners may be adopted. The first server may acquire thecode stream from another server except the second server. Alternatively,the first server may acquire the code stream from storage equipmentconfigured to store the code stream.

The first server may acquire the initial position for sending the codestream in multiple acquisition manners. In an exemplary embodiment, theinitial position may be acquired in any of the following manners. Thefirst server may acquire the initial position in a manner of negotiatingwith the second server. Alternatively, the first server may acquire theinitial position which is preset.

FIG. 2 is a flowchart of a first code stream processing method accordingto an exemplary embodiment of the disclosure. As shown in FIG. 2, theflow may include the following acts:

At act S202, a second server may receive a message sent by an SCU. Themessage may be used for notifying the second server that a first serveris to replace the second server to send a code stream.

At act 204, the second server may acquire an initial position forsending the code stream by the first server.

At act S206, the second server may stop sending the code stream at theinitial position.

By the acts, when the second server is to be replaced, the first servermay replace the second server to send the code stream, the initialposition for sending the code stream may be acquired, and the firstserver may send the code stream starting from the initial position,thereby implementing seamless migration of a multicast channel. Byvirtue of the solution, a problem of incapability in implementingmigration of the multicast channel without service interruption may besolved and an effect of migrating the multicast channel without serviceinterruption may be achieved.

Multiple manners may be adopted to acquire the initial position forsending the code stream. In an exemplary embodiment, the initialposition may be acquired in a manner of negotiation between the firstserver and the second server.

In an exemplary embodiment, the act that the second server receives themessage sent by the SCU may include the following acts. The secondserver may receive, in a manner of interacting with the SCU aboutreal-time information of the code stream, the message sent by the SCU.The real-time information of the code stream may be used by the SCU forsending a notification message to the first server. The notificationmessage may be used for notifying the first server to acquire and cachethe code stream which is substantially the same as the code stream ofthe second server, acquire the initial position for sending the codestream, and after the second server stops sending the code stream,construct a message corresponding to the code stream and send themessage starting from the initial position according to a source IPaddress of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information. The codestream information may include at least one of the followinginformation: a source of the code stream, a protocol type of the codestream, a starting position of caching the code stream and informationof the second server.

FIG. 3 is a flowchart of a second code stream processing methodaccording to an exemplary embodiment of the disclosure. As shown in FIG.3, the flow may include the following acts.

At act S302, an SCU may notify a first server to acquire and cache acode stream which is substantially the same as a code stream of a secondserver.

At act S304, after receiving, from the first server, informationindicating normal acquisition of the code stream, the SCU may send theinformation of the first server to the second server.

By the acts, when the second server is required to be replaced, the SCUmay notify the first server to acquire and cache the code stream whichis substantially the same as the code stream of the second server, andthe first server may send the code stream from a determined initialposition for sending the code stream, thereby implementing seamlessmigration of a multicast channel. By virtue of the solution, a problemof incapability in implementing migration of the multicast channelwithout service interruption may be solved and an effect of migratingthe multicast channel without service interruption may be achieved.

In an exemplary embodiment, the initial position for sending the codestream may be determined through negotiation performed by the secondserver with the first server according to the information of the firstserver.

When the SCU notifies the first server to acquire and cache the codestream which is substantially the same as the code stream of the secondserver, the following implementation manner may be adopted. The SCU mayinteract with the second server about real-time information of the codestream; and the SCU may send a notification message to the first serveraccording to the real-time information of the code stream. Thenotification message may be used for notifying the first server toacquire and cache the code stream which is substantially the same as thecode stream of the second server. The notification message is furtherused for notifying the first server to acquire the initial position forsending the code stream, and after the second server stops sending thecode stream, construct a message corresponding to the code stream andsend the message starting from the initial position according to asource IP address of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information. The codestream information may include at least one of the followinginformation: a source of the code stream, a protocol type of the codestream, a starting position of caching the code stream and informationof the second server.

The SCU may select a server for replacing the second server. Afterselecting a server incapable of taking over a service of the secondserver, the SCU may further select another one. In an exemplaryembodiment, after receiving, from the first server, informationindicating acquisition abnormity of the code stream, the SCU may selecta new server for replacing the second server.

In an exemplary embodiment, after the act that the SCU sends theinformation of the first server to the second server, the method mayfurther include the following act: A sending result reported by thefirst server may be received. The sending result is a sending result ofsending the message by the first server. Until completion of this act,the whole channel migration process is finished, and the subsequent codestream may be provided by the first server. After the second serverreturns to normal, the second server may continue sending code streams.

From the above descriptions about the implementation modes, thoseskilled in the art may clearly learn about that the methods according tothe abovementioned exemplary embodiments may be implemented in a mannerof combining software and a universal hardware platform, and of course,may alternatively be implemented through hardware. Based on such anunderstanding, the exemplary embodiments of the disclosure may beembodied in a form of software product, and the computer softwareproduct may be stored in a storage medium (such as a Read-Only Memory(ROM)/Random Access Memory (RAM), a magnetic disk and an optical disk),including instructions configured to enable computer equipment (whichmay be a mobile phone, a computer, a server, network equipment or thelike) to execute the methods of the exemplary embodiments of thedisclosure.

An exemplary embodiment provides a message sending device. The devicemay be configured to implement the abovementioned exemplary embodiment,and what has been described will not be elaborated. For example, term“module”, used below, may be a combination of software and/or hardwarecapable of realizing a preset function. Although the device described inthe following exemplary embodiment may be implemented with software,implementation with hardware or a combination of the software and thehardware is also possible and conceivable.

FIG. 4 is a structure block diagram of a message sending deviceaccording to an exemplary embodiment of the disclosure. As shown in FIG.4, the device may be applied to a first server, and may include a firstacquisition module 42, a second acquisition module 44 and a firstsending module 46. The device will be described below.

The first acquisition module 42 may be configured to acquire and cache acode stream, which is substantially the same as a code stream of asecond server. The second acquisition module 44 may be coupled to thefirst acquisition module 42, and may be configured to acquire an initialposition for sending the code stream. The first sending module 46 may becoupled to the second acquisition module 44, and may be configured to,after the second server stops sending the code stream, construct amessage corresponding to the code stream, and send the message startingfrom the initial position according to a source IP address of the secondserver.

In an exemplary embodiment, the first sending module 46 may send themessage according to a source IP address of the second server in thefollowing manner. The first server may add a local route to send themessage by virtue of the source IP address of the second server.Alternatively, the first server may fill the source IP address of thesecond server into an IP address field of the message, and send themessage.

FIG. 5 is a first structure block diagram of a message sending deviceaccording to an exemplary embodiment of the disclosure. As shown in FIG.5, the device may further include a first receiving module 52, besidesthe modules shown in FIG. 4. The device will be described below.

The first receiving module 52 may be coupled to the first acquisitionmodule 42, and may be configured to receive a notification message sentby an SCU. The notification message may be used for notifying the firstserver to acquire code stream information. The code stream informationmay be used by the first server for acquiring and caching the codestream. The code stream information may include at least one of thefollowing information: a source of the code stream, a protocol type ofthe code stream, a starting position of caching the code stream andinformation of the second server.

FIG. 6 is a second structure block diagram of a message sending deviceaccording to an exemplary embodiment of the disclosure. As shown in FIG.6, the device may further include a first notification module 62,besides the modules shown in FIG. 4. The device will be described below.

The first notification module 62 may be coupled to the first acquisitionmodule 42, and may be used for notifying the SCU of an acquisitionresult of acquiring the code stream. The acquisition result may be usedby the SCU for judging whether to reselect a server for replacing thesecond server or not, and after determining that it is not needed toreselect the server, the SCU may send information of the first server tothe second server.

FIG. 7 is a third structure block diagram of a message sending deviceaccording to an exemplary embodiment of the disclosure. As shown in FIG.7, the device may further include a reporting module 72, besides themodules shown in FIG. 4. The device will be described below.

The reporting module 72 may be coupled to the first sending module 46,and may be configured to report a sending result of sending the messageto the SCU.

In an exemplary embodiment, the first acquisition module 42 may acquirethe code stream in at least one of the following manners: The firstserver may acquire the code stream from another server except the secondserver. The first server may acquire the code stream from storageequipment configured to store the code stream.

In an exemplary embodiment, the second acquisition module 44 may acquirethe initial position in at least one of the following manners. The firstserver may acquire the initial position in a manner of negotiating withthe second server. The first server may acquire the initial positionwhich is preset.

FIG. 8 is a structure block diagram of a first code stream processingdevice according to an exemplary embodiment of the disclosure. As shownin FIG. 8, the device may be applied to a second server, and may includea second receiving module 82, a third acquisition module 84 and astopping module 86. The device will be described below.

The second receiving module 82 may be configured to receive a messagesent by an SCU, and the message may be used for notifying the secondserver that a first server is to replace the second server to send acode stream. The third acquisition module 84 may be coupled to thesecond acquisition module 82, and may be configured to acquire aninitial position for sending the code stream by the first server. Thestopping module 86 may be coupled to the third acquisition module 84,and may be configured to stop sending the code stream at the initialposition.

In an exemplary embodiment, the third acquisition module 84 may befurther configured to: acquire the initial position in a manner ofnegotiating with the first server.

The second receiving module 82 may be configured to receive, in a mannerof interacting with the SCU about real-time information of the codestream, the message sent by the SCU. The real-time information of thecode stream may be used by the SCU for sending a notification message tothe first server. The notification message may be used for notifying thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server, acquire the initialposition for sending the code stream, and after the second server stopssending the code stream, construct a message corresponding to the codestream and send the message starting from the initial position accordingto a source IP address of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information. The codestream information may include at least one of the followinginformation: a source of the code stream, a protocol type of the codestream, a starting position of caching the code stream and informationof the second server.

FIG. 9 is a structure block diagram of a second code stream processingdevice according to an exemplary embodiment of the disclosure. As shownin FIG. 9, the device may be applied to an SCU, and may include a secondnotification module 92 and a second sending module 94. The device willbe described below.

The second notification module 92 may be configured to notify a firstserver to acquire and cache a code stream which is substantially thesame as a code stream of a second server. The second sending module 94may be coupled to the second notification module 92, and may beconfigured to, after information indicating normal acquisition of thecode stream is received from the first server, send the information ofthe first server to the second server, wherein the information of thefirst server may be used for determining an initial position for sendingthe code stream by the first server.

In an exemplary embodiment, the initial position is determined throughnegotiation performed by the second server with the first serveraccording to the information of the first server.

FIG. 10 is a structure block diagram of a second notification module 92in a second code stream processing device according to an exemplaryembodiment of the disclosure. As shown in FIG. 10, the secondnotification module 92 may include an interaction unit 102 and a sendingunit 104. The second notification module 92 will be described below.

The interaction unit 102 may be configured to interact with the secondserver about real-time information of the code stream. The sending unit104 may be coupled to the interaction unit 102, and may be configured tosend a notification message to the first server according to thereal-time information of the code stream. The notification message maybe used for notifying the first server to acquire and cache the codestream which is substantially the same as the code stream of the secondserver, and the notification message may be further used for notifyingthe first server to acquire the initial position for sending the codestream, and after the second server stops sending the code stream,construct a message corresponding to the code stream and send themessage starting from the initial position according to a source IPaddress of the second server.

In an exemplary embodiment, the notification message may notify thefirst server to acquire and cache the code stream which is substantiallythe same as the code stream of the second server in a manner ofnotifying the first server to acquire code stream information. The codestream information may include at least one of the followinginformation: a source of the code stream, a protocol type of the codestream, a starting position of caching the code stream and informationof the second server.

FIG. 11 is a first structure block diagram of a second code streamprocessing device according to an exemplary embodiment of thedisclosure. As shown in FIG. 11, the device may further include aselection module 112, besides the modules shown in FIG. 9. The devicewill be described below.

The selection module 112 may be coupled to the second notificationmodule 92, and may be configured to, after information indicatingacquisition abnormity of the code stream is received from the firstserver, select a third server to replace the second server.

FIG. 12 is a second structure block diagram of a second code streamprocessing device according to an exemplary embodiment of thedisclosure. As shown in FIG. 12, the device may further include a thirdreceiving module 122, besides the modules shown in FIG. 9. The devicewill be described below.

The third receiving module 122 may be coupled to the second sendingmodule 94, and may be configured to receive a sending result reported bythe first server. The sending result is a sending result of sending themessage by the first server.

FIG. 13 is a schematic diagram of code stream introduction of amulticast outgoing channel. As shown in FIG. 13, the flow may includethe following acts:

At act S1302, an SCU may notify a server A (substantially the same asthe abovementioned second server) to create a channel. Outgoinginformation of the channel may include an IP address and a port number.An ingoing direction of the channel may be a unicast code streamrequiring an IP address, port and protocol access manner of a codestream source. The ingoing direction of the channel may alternatively bea multicast code stream requiring an IP address and port of a multicastgroup. The ingoing direction of the channel may also be a static filerequiring information such as a file path and a reading manner. Theserver may send a code stream in an outgoing direction, and the servermay receive a code stream in the ingoing direction.

At act S1304, the server A may start executing an operation of receivinga code stream according to information provided by the SCU.

At act S1306, after normally receiving a code stream, the server A maystart code stream processing, for example, transcoding or recording, andmay send the code stream in a form of multicast.

At act S1308, after normally receiving the code stream, the server A mayreply the SCU with a channel creation result, and the SCU may record theresult.

At act S1310, the SCU may interact with the server A about informationof the code stream, for example, a timestamp and code stream importancedescription information. The importance description information may bean analysis result of the server A, may alternatively be staticallyprovided by the SCU, and may alternatively be obtained by dynamictimestamp interaction. There are no limits made to provision manners ofthe importance description information.

An exemplary embodiment of the disclosure provides a method forseamlessly migrating a multicast channel. By virtue of thecharacteristic that a multicast code stream does not require aconnection to be kept, a server B which will take over service (as anembodiment of the abovementioned first server) may acquire a code streamposition determined by negotiation of an original server A (as anembodiment of the abovementioned second server) (the two servers may bein the same cluster), and construct a message from the position. Theserver B may simulate a source IP address of the server A as a source IPaddress, or continue sending the message in layer-2 message sendingmanner, to keep (S, G) of an intermediate link unchanged. Sincemulticast may require no connection and the message is continuous, acode stream receiving party may not perceive any change. (S, G) is amulticast tree entry, where S is a multicast source and G is a multicastgroup. The exemplary embodiment will be described below.

FIG. 14 is a schematic diagram of migration of a multicast outgoingchannel according to an exemplary embodiment of the disclosure. As shownin FIG. 14, the flow may include the following acts:

At act S1402, an SCU may interact with a server A about real-timeinformation of a code stream. The code stream may be a real-time codestream, for example, an outgoing code stream of a coder, and mayalternatively be a static code stream, for example, a static file.

At act S1404, the SCU may notify a server B to add the correspondingcode stream to ensure that the code stream accessed by the server B issubstantially the same as the server A. The operation may include thefollowing acts. The SCU may notify the server B to acquire the codestream. A notification message may include a source (IP address andport) of the code stream, a code stream transmission manner (protocoltype), a corresponding position (approximate position where caching isstarted) and information of the server A. The server B may acquire andcache the same original code stream as the server A according to thenotification. The code stream may be dynamically obtained from anotherserver, for example, acquired from an outgoing multicast stream orunicast stream of the coder. The code stream may alternatively beacquired from a storage system, for example, reading the file with anoffset by a position from a magnetic disk.

At act S1406, the server B may acquire and cache the code stream.

At act S1408, the server B may give a reply to the SCU after normalacquisition, and may stop in case of an abnormity, and the SCU mayselect another server for replacing the server A.

At act S1410, the SCU may notify the server A of information of areplacer according to the reply, and the preparation flow is completed.

At act S1412, the server A may negotiate with the server B according toselectable code stream positions. A low-importance position of the codestream may be usually selected. The server B may start work beforesimulated packet sending, for example, addition of a lo route, similarto e.g., ip route add local IP_A dev lo tab local, where IP_A is asource IP address of the server A for providing channel service. Sincethe two servers are in the same cluster, an outgoing network is thesame, and the server B has a capability of sending a packet by virtue ofIP_A. Alternatively, the server B may use a manner of constructing alayer-2 message, and may determine the source IP address of the server Aas a source IP address of the message to simulate packet sending of theserver A. The server A may return to the server B a checksum of a lastoriginal User Datagram Protocol (UDP) message to be sent of the channeland a last Real-time Transport Protocol (UTP) sequence number of thecorresponding outgoing code stream. The negotiated position with lowservice importance may be an end or opening of a television drama or acompetition, and may last for one or more messages, so as to improvestability and robustness when service is taken over. A code streamposition weight table is code stream importance description information,and may be static, for example, analyzed specified file offset, or maybe dynamic and change along with a timestamp, with forms and contentsunlimited.

At act S1414, the server A may stop sending the code stream.

At act S1416, the server B may find the message corresponding to thechannel from its own cache for caching according to a source IP addressof the channel, a source port, a destination IP address and adestination port, then find the UDP message corresponding to the ingoingoriginal code stream in the cache according to the checksum, transcodethe UDP message and send the transcoded code stream by virtue of theacquired RTP message, the IP_A and a port specified by the SCU.

At act S1418, the server B may report a result to the SCU. This codestream may continue using the IP address and port of the server A, sothat a user may not feel any change. The whole channel migration processis finished, and the subsequent code stream may be continuously providedby the server B. After the server A returns to normal, acts S1402 toS1418 may be repeated to migrate the code stream back.

In the whole process, the (S, G) entry of a multicast router does notchange, and the user may perceive no changes in the source IP and thesource port, just like that the whole code stream have never changed, sothat the stability of the code stream is directly ensured, and a userexperience is improved. By the technical solution in the abovementionedexemplary embodiment, the multicast outgoing channel may be convenientlymigrated. For any service providing service data in a multicast manner,for example, a multicast channel directly providing direct broadcastingservice and a multicast channel providing code stream relaying, thismanner may be used. The code stream receiving party is freed frominfluence of regulation of upper-layer service, and a good code streamreceiving effect may be achieved.

It is important to note that the modules may be implemented throughsoftware or hardware, and for the latter condition, may be implementedin, but not limited to, the following manner: the modules may be locatedin the same processor; or, the modules may be located in multipleprocessors respectively.

An exemplary embodiment of the disclosure provides a storage medium. Inan exemplary embodiment, the storage medium may be configured to storeprogram codes for executing the following acts.

At act S1, a first server may acquire and cache a code stream which issubstantially the same as a code stream of a second server.

At act S2, the first server may acquire an initial position of the codestream.

At act S3, after the second server stops sending the code stream, thefirst server may construct a message corresponding to the code stream,and may send the message starting from the initial position according toa source IP address of the second server.

In an exemplary embodiment, the storage medium may be further configuredto store program codes for executing the following acts:

At act S1, the second server may receive a message sent by an SCU. Themessage may be used for notifying the server that the first server mayreplace the second server to send the code stream.

At act S2, the second server may acquire the initial position forsending the code stream by the first server.

At act S3, the second server may stop sending the code stream accordingto the initial position.

In an exemplary embodiment, the storage medium may further be configuredto store program codes for executing the following acts:

At act S1, the SCU may notify the first server to acquire and cache thecode stream which is substantially the same as the code stream of thesecond server.

At act S2, after receiving, from the first server, informationindicating normal acquisition of the code stream, the SCU may send theinformation of the first server to the second server.

In an exemplary embodiment, the storage medium may include, but notlimited to: various media capable of storing program codes, such as a Udisk, a ROM, a RAM, a mobile hard disk, a magnetic disk or an opticaldisk.

In an exemplary embodiment, specific examples in the exemplaryembodiment may refer to the examples described in the abovementionedexemplary embodiments and optional implementation modes, and will not beelaborated in the exemplary embodiment.

Obviously, those skilled in the art should know that each module or eachstep of the disclosure may be implemented by a universal computingdevice, and the modules or acts may be concentrated on a singlecomputing device or distributed on a network formed by a plurality ofcomputing devices, and may optionally be implemented by program codesexecutable for the computing devices, so that the modules or acts may bestored in a storage device for execution with the computing devices, theshown or described acts may be executed in sequences different fromthose described here in some circumstances, or may form each integratedcircuit module respectively, or multiple modules or acts therein mayform a single integrated circuit module for implementation.

The above contents are only the exemplary embodiments of the disclosureand not intended to limit the disclosure.

INDUSTRIAL APPLICABILITY

Some exemplary embodiments of the disclosure may implement migration ofa multicast channel without service interruption.

What is claimed is:
 1. A message sending method, comprising: acquiringand caching, by a first server, a code stream which is substantially thesame as a code stream of a second server; acquiring, by the firstserver, an initial position for sending the code stream; and after thesecond server stops sending the code stream, constructing, by the firstserver, a message corresponding to the code stream, and sending, by thefirst server, the message starting from the initial position accordingto a source Internet Protocol (IP) address of the second server; whereinacquiring, by the first server, the initial position for sending thecode stream comprises: acquiring, by the first server, the initialposition in a manner of negotiating with the second server; wherein thefirst server and the second server negotiate on a code stream locationwhich is of low importance.
 2. The method as claimed in claim 1, whereinsending, by the first server, the message according to the source IPaddress of the second server comprises: adding, by the first server, alocal route to send the message by virtue of the source IP address ofthe second server; or, filling, by the first server, the source IPaddress of the second server into an IP address field of the message,and sending, by the first server, the message.
 3. The method as claimedin claim 1, before acquiring and caching, by the first server, the codestream which is substantially the same as the code stream of the secondserver, further comprising: receiving, by the first server, anotification message sent by a Service Control Unit (SCU), wherein thenotification message is operative to notify the first server to acquirecode stream information, the code stream information is used by thefirst server for acquiring and caching the code stream, and the codestream information comprises at least one of the following information:a source of the code stream, a protocol type of the code stream, astarting position of caching the code stream and information of thesecond server.
 4. The method as claimed in claim 1, after acquiring andcaching, by the first server, the code stream which is substantially thesame as the code stream of the second server, further comprising:notifying, by the first server, the SCU of an acquisition result ofacquiring the code stream, wherein the acquisition result is used toindicate whether to reselect a server for replacing the second server ornot to the SCU, and responsive to determining that it is not needed toreselect the server, the SCU sends information of the first server tothe second server.
 5. The method as claimed in claim 1, afterconstructing, by the first server, the message corresponding to the codestream and sending the message starting from the initial positionaccording to the source IP address of the second server, furthercomprising: reporting, by the first server, a sending result obtainedafter sending the message to the SCU.
 6. The method as claimed in claim1, wherein acquiring, by the first server, the code stream which is thesame as the code stream of the second server comprises at least one ofthe following acts: acquiring, by the first server, the code stream fromanother server except the second server; and acquiring, by the firstserver, the code stream from storage equipment configured to store thecode stream.
 7. The method as claimed in claim 1, wherein acquiring, bythe first server, the initial position for sending the code streamfurther comprises: acquiring, by the first server, the initial positionwhich is preset.
 8. A code stream processing method, comprising:receiving, by a second server, a message sent by a Service Control Unit(SCU), wherein the message is used for notifying the second server thata first server is to replace the second server to send a code stream;acquiring, by the second server, an initial position for sending thecode stream by the first server; and stop sending, by the second server,the code stream at the initial position; wherein acquiring, by thesecond server, an initial position for sending the code stream by thefirst server comprises: acquiring, by the second server, the initialposition in a manner of negotiating with the first server; wherein thefirst server and the second server negotiate on a code stream locationwhich is of low importance.
 9. The method as claimed in claim 8, whereinreceiving, by the second server, the message sent by the SCU comprises:receiving, by the second server in a manner of interacting with the SCUabout real-time information of the code stream, the message sent by theSCU, wherein the real-time information of the code stream is used by theSCU for sending a notification message to the first server, and thenotification message is used for notifying the first server to acquireand cache the code stream which is substantially the same as the codestream of the second server, acquire the initial position for sendingthe code stream, and after the second server stops sending the codestream, construct a message corresponding to the code stream and sendthe message starting from the initial position according to a sourceInternet Protocol (IP) address of the second server.
 10. The method asclaimed in claim 9, wherein the notification message notifies the firstserver to acquire and cache the code stream which is substantially thesame as the code stream of the second server in a manner of notifyingthe first server to acquire code stream information, and the code streaminformation comprises at least one of the following information: asource of the code stream, a protocol type of the code stream, astarting position of caching the code stream and information of thesecond server.
 11. A code stream processing method, comprising:notifying, by a Service Control Unit (SCU), a first server to acquireand cache a code stream which is substantially the same as a code streamof a second server; and after receiving, from the first server,information indicating normal acquisition of the code stream, sending,by the SCU, information of the first server to the second server,wherein the information of the first server is used for determining aninitial position for sending the code stream by the first server;wherein the initial position is determined through negotiation performedby the second server with the first server according to the informationof the first server; wherein the first server and the second servernegotiate on a code stream location which is of low importance.
 12. Themethod as claimed in claim 11, wherein notifying, by the SCU, the firstserver to acquire and cache the code stream which is substantially thesame as the code stream of the second server comprises: interact, by theSCU, with the second server about real-time information of the codestream; and sending, by the SCU, a notification message to the firstserver according to the real-time information of the code stream,wherein the notification message is used for notifying the first serverto acquire and cache the code stream which is substantially the same asthe code stream of the second server, and the notification message isfurther used for notifying the first server to acquire the initialposition for sending the code stream, and after the second server stopssending the code stream, construct a message corresponding to the codestream and send the message starting from the initial position accordingto a source Internet Protocol (IP) address of the second server.
 13. Themethod as claimed in claim 12, wherein the notification message notifiesthe first server to acquire and cache the code stream which issubstantially the same as the code stream of the second server in amanner of notifying the first server to acquire code stream information,wherein the code stream information comprises at least one of thefollowing information: a source of the code stream, a protocol type ofthe code stream, a starting position of caching the code stream andinformation of the second server.
 14. The method as claimed in claim 11,further comprising: after receiving, from the first server, informationindicating acquisition abnormity of the code stream, selecting, by theSCU, a third server to replace the second server.
 15. The method asclaimed in claim 12, after sending, by the SCU, the information of thefirst server to the second server, further comprising: receiving asending result reported by the first server, wherein the sending resultis a sending result obtained after sending the message by the firstserver.
 16. A message sending device comprising: a server; a firstacquisition module, configured to acquire and cache a code stream whichis substantially the same as a code stream of a second server; a secondacquisition module, configured to acquire an initial position forsending the code stream; and a first sending module, configured to,after the second server stops sending the code stream, construct amessage corresponding to the code stream, and send the message startingfrom the initial position according to a source Internet Protocol (IP)address of the second server; wherein the second acquisition module isfurther configured to acquire the initial position in a manner ofnegotiating with the second server; wherein the first server and thesecond server negotiate on a code stream location which is of lowimportance.
 17. A code stream processing device, applied to a secondserver and comprising: a second receiving module, configured to receivea message sent by a Service Control Unit (SCU), wherein the message isused for notifying the second server that a first server is to replacethe second server to send a code stream; a third acquisition module,configured to acquire an initial position for sending the code stream bythe first server; and a stopping module, configured to stop sending thecode stream at the initial position; wherein the third acquisitionmodule is further configured to acquire the initial position in a mannerof negotiating with the first server; wherein the first server and thesecond server negotiate on a code stream location which is of lowimportance.
 18. A code stream processing device, comprising: a secondnotification module, configured to notify a first server to acquire andcache a code stream which is substantially the same as a code stream ofa second server; and a second sending module, configured to, afterinformation indicating normal acquisition of the code stream is receivedfrom the first server, send the information of the first server to thesecond server, wherein the information of the first server is used fordetermining an initial position for sending the code stream by the firstserver; wherein the initial position is determined through negotiationperformed by the second server with the first server according to theinformation of the first server; wherein the first server and the secondserver negotiate on a code stream location which is of low importance.